/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.farmcode.base.dao;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 *
 * @author oiprado
 */
public abstract class BaseFilter implements Serializable {
  
  private List<String> keys = new ArrayList<String>();
  private HashMap<String, Object> values = new HashMap<String, Object>();
  private HashMap<String, Object> conditions = new HashMap<String, Object>();
  public abstract void fill();
  
  public void clear(){
    values.clear();
    conditions.clear();
    keys.clear();
  }
  
  public void setParameter(String name, String condition, Object value){
    keys.add(name);
    values.put(name, value);
    conditions.put(name, condition);
  }

  /**
   * @return the keys
   */
  public List<String> getKeys() {
    return keys;
  }

  /**
   * @param keys the keys to set
   */
  public void setKeys(List<String> keys) {
    this.keys = keys;
  }

  /**
   * @return the values
   */
  public HashMap<String, Object> getValues() {
    return values;
  }

  /**
   * @param values the values to set
   */
  public void setValues(HashMap<String, Object> values) {
    this.values = values;
  }

  /**
   * @return the conditions
   */
  public HashMap<String, Object> getConditions() {
    return conditions;
  }

  /**
   * @param conditions the conditions to set
   */
  public void setConditions(HashMap<String, Object> conditions) {
    this.conditions = conditions;
  }
  
}
